home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / 3d & render tools / irit / man / man6 / scrvtr.6 < prev    next >
Encoding:
Text File  |  1996-07-16  |  3.0 KB  |  86 lines

  1. .TH SCRVTR
  2.  6 "IRIT Version 6.0" 
  3. .SH NAME
  4. SCRVTR
  5.  
  6.  
  7.  
  8.  SurfaceType SCRVTR( SurfaceType Srf, ConstType PtType, ConstType Dir )
  9.  
  10. Symbolically computes the extreme curvature bound on Srf.
  11. If Dir is either ROW or COL, then the normal curvature square
  12. of Srf in Dir is computed symbolically and returned.
  13. Otherwise, a upper bound on the sum of the squares of the two
  14. principal curvatures is symbolically computed and returned.
  15.  
  16. Returned value is a surface that can be evaluated to the curvature
  17. bound, given a UV location. The returned surface value is a scalar field
  18. of point type P1 (scalar rational).
  19. However, if PtType is one of E1, P1, E3, P3 the returned surface
  20. is coerced to this given type. If the types are one of E3, P3, then the
  21. Y and Z axes are set to be equivalent to the U and V parametric domains.
  22.  
  23.    This function computes the square of the normal curvature scalar
  24.  field for surfaces as (in the U parametric direction, same for V),
  25.                      2  
  26.                     d S
  27.               < n , --- >
  28.                       2
  29.     u               du
  30.    k (u, v) = ------------
  31.     n         
  32.                  dS   ds
  33.                < -- , -- >
  34.                  du   du
  35.  
  36.  and computes the sum of the squares of the principal curvatures as,
  37.  
  38.   2    2  ( g11 l22 + g22 l11 - 2 g12 l12 )^2 - 2 |G| |L|
  39.  k  + k = -----------------------------------------------
  40.   1    2                   |G|^2 ||n||^2
  41.  
  42.  
  43. See also CCRVTR.
  44.  
  45. Example:
  46.  
  47.  cross = cbspline( 3,
  48.                    list( ctlpt( E2,  0.0,  0.0 ),
  49.                          ctlpt( E2,  0.8,  0.0 ),
  50.                          ctlpt( E2,  0.8,  0.2 ),
  51.                          ctlpt( E2,  0.07, 1.4 ),
  52.                          ctlpt( E2, -0.07, 1.4 ),
  53.                          ctlpt( E2, -0.8,  0.2 ),
  54.                          ctlpt( E2, -0.8,  0.0 ),
  55.                          ctlpt( E2,  0.0,  0.0 ) ),
  56.                    list( KV_OPEN ) );
  57.  cross = coerce( cross, e3 );
  58.  s = sFromCrvs( list( cross,
  59.                       cross * trans( vector( 0.5, 0, 1 ) ),
  60.                       cross * trans( vector( 0, 0, 2 ) ) ), 3 );
  61.  view( list( s, axes ), on );
  62.  
  63.  UCrvtrZXY = scrvtr( s, E3, row );
  64.  VCrvtrZXY = scrvtr( s, E3, col );
  65.  UCrvtrXYZ = UCrvtrZXY * rotx( -90 ) * roty( -90 ) * scale( vector( 1, 1, 0.001 ) );
  66.  VCrvtrXYZ = VCrvtrZXY * rotx( -90 ) * roty( -90 ) * scale( vector( 1, 1, 10 ) );
  67.  color( UCrvtrXYZ, red );
  68.  color( VCrvtrXYZ, magenta );
  69.  
  70.  view( list( UCrvtrXYZ, VCrvtrXYZ ), off );
  71.  
  72.  CrvtrZXY = scrvtr( s, E3, off );
  73.  CrvtrXYZ = CrvtrZXY * rotx( -90 ) * roty( -90 ) * scale( vector( 1, 1, 0.001 ) );
  74.  color( CrvtrXYZ, green );
  75.  
  76.  view( CrvtrXYZ, off );
  77.  
  78. Computes the sqaure of the normal curvature in the U and V direction, flips
  79. its scalar value from X to Z using rotations and scale the fields to
  80. reasonable values and display them.
  81. Then, display a total bound on the normal curvature as well.
  82.  
  83. Due to the large degree of the resulting fields be warned that rational
  84. surfaces will compute into large degree curvature bound fields. See also
  85. IRITSTATE("InterpProd", FALSE); for faster symbolic computation.
  86.